#include "classes.h"


void test1()
{
    Worker* worker = NULL;
    worker = new Employee(1, "张三", 1);
    worker->show_info();
    delete worker;

    worker = new Manager(2, "李四", 2);
    worker->show_info();
    delete worker;

    worker = new Boss(3, "王五", 3);
    worker->show_info();
    delete worker;
}

int main()
{
    //int ret;
    //test1();
    WorkerManager wm;//创建管理者对象
    int choice = 0;
    while(true)
    {
        wm.show_menu();//显示菜单
        cout << "请输入您的选择: ";
        cin >> choice;
        switch (choice)
        {
            case 0://退出系统
                wm.exit_system();
                break;
            case 1://添加员工信息
                wm.add_emp();
                break;
            case 2://显示职工信息
                wm.show_emp();
                break;
            case 3://删除员工信息
                wm.delete_emp();
                break;
            case 4://修改员工信息
                wm.modify_emp();
                break;
            case 5://查找员工信息
                wm.find_emp();
                break;
            case 6://排序员工信息
                wm.sort_emp();
                break;
            case 7://清空员工信息
                wm.clean_emp();
            break;
            default:
                //system("cls");
            break;
        }
    }
    
    return 0;
}